#include<iostream>
using namespace std;
int n, m;
int ans;
void dfs(int u, int sum, int last)
{
	if (u == m) {
		if (!sum)ans++;
		return;
	}
	for (int i = last; i <= sum; i++) {
		dfs(u + 1, sum - i, i);
	}
}
int main()
{
	while (cin >> n >> m) {
		ans = 0;
		dfs(0, n, 0);
		cout << ans << endl;
	}
	return 0;
}